local path = select(1, ...)
-- 兼容一下lua版本
unpack = table.unpack or unpack
load = loadstring or load
Love2dKeys = {'update', 'draw', 'load', 
	'keypressed', 'keyreleased', 
	'mousepressed', 'mousereleased', 'mousemoved', 
	'touchpressed', 'touchmoved', 'touchreleased',
	"resize"
}

local systems = {}
function RegisterSystem(sys)
    table.insert(systems, sys)
end

for _, key in ipairs(Love2dKeys) do
	love[key] = function(...)
        for i = 1, #systems do
            local sys = systems[i]
            if sys[key] then
                sys[key](sys, ...)
            end
        end
	end
end
require(path..".global")
require(path..".setting")
require(path..".config")
require(path..".base")
require(path..".data")
require(path..".systems")
require(path..".tools")
require(path..".codeResources.codeImages.codeIcons")
require(path..".codeResources.codeImages.elements")
require(path..".outlook")
require(path..".gameManager")

function Test(fn)
    if not fn() then
        Console.log("test error!")
    end
end
-- require(path..".test")
Modules = {}
function AddModule(moduleName)
    Modules[moduleName] = Module.new(moduleName)
    Modules[moduleName]:requireScripts()
end